package ws.jonas.common.model;

import java.util.ArrayList;
import java.util.Iterator;

public class Store implements Iterable<Quantity> {
	private String address;
	private String city;
	private String county;
	private ArrayList<Quantity> qtys;
	
	public Store(String address, String city, String county) {
		this.address = address;
		this.city = city;
		this.county = county;
		qtys = new ArrayList<Quantity>(); 
	}
	
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCounty() {
		return county;
	}

	public void setCounty(String county) {
		this.county = county;
	}

	public void addQuantity(String size, int qty) {
		qtys.add(new Quantity(size, qty));
	}
	
	@Override
	public String toString() {
		return "Store[ address=" + address + ", city=" + city + ", county=" + county + ", qtys=" + qtys + " ]";
	}

	@Override
	public Iterator<Quantity> iterator() {
		return qtys.iterator();
	}
}
